﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OnlineBookStore.Controls;

namespace OnlineBookStore
{
    public partial class MyAccountInfo : MyPageBase
    {
        protected override void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);
           //通过Master来查找母版页里的ScriptManager
            ScriptManager ScriptManager1 = Master.FindControl("ScriptManager1") as ScriptManager;
           //注册三个按钮为异步提交  
            ScriptManager1.RegisterAsyncPostBackControl(LinkButton1);
            ScriptManager1.RegisterAsyncPostBackControl(LinkButton2);
            ScriptManager1.RegisterAsyncPostBackControl(LinkButton3);
        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            PlaceHolder1.Controls.Clear();
            PlaceHolder1.Controls.Add(LoadControl("~/Controls/ChangeInfo.ascx"));
            UpdatePanel1.Update();
        }

        protected void LinkButton3_Click(object sender, EventArgs e)
        {
            PlaceHolder1.Controls.Clear();
            PlaceHolder1.Controls.Add(new ChangePassword());
            UpdatePanel1.Update();
        }
    }
}
